<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>SaltShaker</title>
    {% load staticfiles %}
    <!-- Bootstrap Core CSS -->
    <link href="{% static "bower_components/bootstrap/dist/css/bootstrap.min.css" %}" rel="stylesheet">

    <!-- MetisMenu CSS -->
    <link href="{% static "bower_components/metisMenu/dist/metisMenu.min.css" %}" rel="stylesheet">

    <!-- DataTables CSS -->
    <link href="{% static "bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.css" %}" rel="stylesheet">

    <!-- DataTables Responsive CSS -->
    <link href="{% static "bower_components/datatables-responsive/css/dataTables.responsive.css" %}" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="{% static "dist/css/sb-admin-2.css" %}" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="{% static "bower_components/font-awesome/css/font-awesome.min.css" %}" rel="stylesheet" type="text/css">
    <link rel="shortcut icon" href="/static/images/favicon.ico" type="image/x-icon" />

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body>

    <div class="container">
        <div class="row">
            <div class="col-md-4 col-md-offset-4">
                <div class="panel-heading" style="padding: 0px 0px 0px 85px;margin-top: 80px">
                        <p class="navbar-brand"><img src="/static/images/logo.png"></p>
                        <p class="navbar-brand" style="padding-top: 25px;padding-left: 0px">SaltShaker</p>
                </div>
                <div class="login-panel panel panel-default" style="margin-top: 60px">
                    <div class="panel-heading">
                        <h3 class="panel-title">Please Sign In</h3>
                    </div>
                    <div class="panel-body">
                        <form method="post" action="/account/login/">
                            <fieldset>
                                <div style="display:none"class="form-group">
                                    <input id="next" class="form-control" placeholder="next" name="next" value="">
                                </div>
                                <div class="form-group">
                                    <input class="form-control" placeholder="Username" name="username" value=""  autofocus>
                                </div>
                                <div class="form-group">
                                    <input class="form-control" placeholder="Password" name="password" type="password">
                                </div>
                                {% if errors %}
                                    {% for error in errors %}
                                    <div class="form-group"><span style="color: red">{{ error }}</span></div>
                                    {% endfor %}
                                {% endif %}
                                <div class="checkbox">
                                    <label>
                                        <input checked name="remember" type="checkbox" value="remember">Remember Me
                                    </label>
                                </div>
                                <!-- Change this to a button or input when using this as a form -->
                                <button type="submit" class="btn btn-lg btn-success btn-block">Login</button>
                            </fieldset>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- jQuery -->
    <script src="{% static "bower_components/jquery/dist/jquery.min.js" %}"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="{% static "bower_components/bootstrap/dist/js/bootstrap.min.js" %}"></script>

    <!-- Metis Menu Plugin JavaScript -->
    <script src="{% static "bower_components/metisMenu/dist/metisMenu.min.js" %}"></script>

    <!-- DataTables JavaScript -->
    <script src="{% static "bower_components/datatables/media/js/jquery.dataTables.min.js" %}"></script>
    <script src="{% static "bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.min.js" %}"></script>

    <!-- Custom Theme JavaScript -->
    <script src="{% static "dist/js/sb-admin-2.js" %}"></script>
    <script type="text/javascript"> 
      //get url param
      $(document).ready(function(){
       function getUrlParam(name){
         var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
         var r = window.location.search.substr(1).match(reg);  //匹配目标参数
         if (r!=null) return unescape(r[2]); return null; //返回参数值
         }        
         var next=getUrlParam('next');
         $("input#next").val(next)
      });
    </script>
</body>
</html>
